package bean;

import com.demo.database.mapper.UserMapper;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;


/**
 * @author Jim
 * @date 12:11 下午 2022/4/4
 * @description
 * @email:huwmz04153277@126.com
 */
public class Mapper {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = Resources.getResourceAsStream("www");
        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream) ;
        SqlSession sqlSession = sqlSessionFactory.openSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
    }
}
